import requests

from api.Ihrm_Login_Api import IHRM_Api


class DEPADD:
    @classmethod
    def add_id(cls,add_body):
        token = IHRM_Api.ihrm_login()
        add_url = "http://ihrm-test.itheima.net/api/company/department"
        add_heard = {"Content-Type": "application/json", "Authorization": token}
        add_reques = requests.post(url=add_url, headers=add_heard, json=add_body)
        print("我是部门添加", add_reques.json())
